package Day8_07_31;

public class StringTest {
	public static void main(String[] args) {
		StringBuffer strbuffer = new StringBuffer("我是一颗");
		strbuffer.append("小");
		strbuffer.append("小");
		strbuffer.append("的");
		strbuffer.append("石");
		strbuffer.append("头");
		System.out.println(strbuffer);

		String str1 = "Hello";
		String str2 = "Java";
		String str3 = "Android";
		String str4 = "Python";
		StringBuilder builder = new StringBuilder(str1);// Hello
		builder.append(str2);// HelloJava
		builder.append(str3);// HelloJavaAndroid
		builder.append(str4);// HelloJavaPython
		System.out.println(builder);
		StringBuilder builder2 = new StringBuilder(str1);
		builder2.append(str2).append(str3).append(str4);
		System.out.println(builder2);
	}
}
